home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
Sherlock 2.0
/
SDEL
/
SDELsrc
/
sdel_es.c
< prev
next >
Wrap
Text File
|
1996-04-02
|
1KB
|
67 lines
/*
SDEL: Application-specific error-stream routines.
Prototypes for all routines in this file are found in LIBes.h.
source: SDEL_es.c
started: April 2, 1996.
version: April 2, 1996.
*/
#include "sdel.h"
#include <LIBLIB.h>
#include <LIBes.h>
#include <LIBlog.h>
/*
All error output eventually comes here.
Defining es here allows each application to define es as it sees fit.
*/
void
es(char * s)
{
if (s) {
log_sout(s);
}
}
void
ecblanks(short n)
{
log_cblanks(n);
}
void
ecnl(void)
{
log_cnl();
}
void
ecnls(short requested_newlines)
{
log_cnls(requested_newlines);
}
/*
es_assert_failed is called by ASSERT.
es_internal_err is called by PERM_ASSERT_TRACE.
*/
void
es_assert_failed(char * condition, int line, char * file)
{
fatal_begin();
ecnl();
es("Assert failed: "); es(condition); enl();
es("line: "); eint(line); es(" file: "); es(file); enl();
}
void
es_internal_err(char * condition, int line, char * file)
{
fatal_begin();
ecnl();
es("Internal error: Assert failed: "); es(condition); enl();
es("file: "); eint(line); es(" line: "); es(file);
}